﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace SachOnlineLibrary.Public
{
    public class LienHe
    {
        private int _ma;

        public int Ma
        {
            get { return _ma; }
            set { _ma = value; }
        }
        private string _ten;

        public string Ten
        {
            get { return _ten; }
            set { _ten = value; }
        }

        private string _email;

        public string Email
        {
            get { return _email; }
            set { _email = value; }
        }

        private string sdt;

        public string SDT
        {
            get { return sdt; }
            set { sdt = value; }
        }
        private string _noidung;

        public string Noidung
        {
            get { return _noidung; }
            set { _noidung = value; }
        }
        private bool _trangthai;

        public bool Trangthai
        {
            get { return _trangthai; }
            set { _trangthai = value; }
        }

        public void ChuyenDoi(DataRow dr)
        {
            Ma = int.Parse(dr[0].ToString());
            Ten = dr[1].ToString();
            Email = dr[2].ToString();
            SDT = dr[3].ToString();          
            Noidung = dr[4].ToString();
            Trangthai = bool.Parse(dr[5].ToString());
        }
    }
}
